package lab01;

/**
 * Created by asus on 2017/10/12.
 */
public class Test5 {
    public static void main(String[] args) {
    int sum=0;  //for语句
    for (  int i=0;i<=100;i++)
        sum=sum+i;
    System.out.println(sum);

    int sum1=0,i1=0;  //while语句
    while(i1<=100)
        sum1=sum1+i1;
    System.out.println( sum1);

    int i2=0,sum2=0;  //do while语句
    do {
        sum2=sum2+i2;
        i2++;
    }
    while(i2<=100);
    System.out.println(sum2);
}
}
